home *** CD-ROM | disk | FTP | other *** search
- global gNastyTimer1, gNastyTimer2, gNastyTimer3, gNastyTimer4, lastTimeDown, gNastyTimer5, gNastyTimer6, gAsteroidTimer1On, gAsteroidSpeed, gtimerflag, gtimerflagB, gtimerflagC, gtimerflagD
-
- on initTimers
- set gNastyTimer1 to the ticks
- set gNastyTimer2 to the ticks
- set gNastyTimer3 to the ticks
- set gNastyTimer4 to the ticks
- set gNastyTimer5 to the ticks
- set gNastyTimer6 to the ticks
- set gAsteroidTimer1On to 0
- set gCreditsTimer to 0
- set gtimerflag to 0
- set gtimerflagB to 0
- set gtimerflagC to 0
- set gtimerflagD to 0
- set gAsteroidSpeed to 1
- end
-
- on checkTimers
- if the ticks > (gNastyTimer1 + seconds(2.0)) then
- NastyTimer1Up()
- set gNastyTimer1 to the ticks
- end if
- if (the ticks > (gNastyTimer4 + (seconds(4.0) / gAsteroidSpeed))) and (gAsteroidTimer1On = 1) then
- if random(3) > 1 then
- AsteroidTimer1Up()
- set gNastyTimer4 to the ticks
- end if
- end if
- if (the ticks > (gNastyTimer2 + seconds(120.0))) and (gtimerflag = 0) then
- set gAsteroidTimer1On to 1
- set gtimerflag to 1
- end if
- if (the ticks > (gNastyTimer3 + seconds(150.0))) and (gtimerflagB = 0) then
- set gAsteroidSpeed to gAsteroidSpeed * 2
- set gtimerflagB to 1
- end if
- if (the ticks > (gNastyTimer3 + seconds(180.0))) and (gtimerflagC = 0) then
- set gAsteroidSpeed to gAsteroidSpeed * 2
- set gtimerflagC to 1
- end if
- if (the ticks > (gNastyTimer3 + seconds(210.0))) and (gtimerflagD = 0) then
- set gAsteroidSpeed to gAsteroidSpeed * 2
- set gtimerflagD to 1
- end if
- checkCreditTimers()
- end
-
- on seconds howMany
- return howMany * 60
- end
-